package pCloud;

public class PCloudAttributeAndType {
	
	public static final String prefix="pCloud:";
	public static final String subjectPrefix = prefix+"subject:";
	public static final String SUBJECT_NAME_ID=subjectPrefix+"name-id";
	public static final String SUBJECT_ROLE_ID=subjectPrefix+"role-id";
	
	public static final String resourcePrefix=prefix+"resource:";
	public static final String RESOURCE_DATABASE_ID=prefix+"rdbms-database-id";
	public static final String RESOURCE_TABLE_ID=prefix+"rdbms-table-id";
	public static final String RESOURCE_COLUMN_ID=prefix+"rdbms-column-id";
	public static final String RESOURCE_DATA_VALUE=prefix+"data-value-id";
	
	
	public static final String obligationPrefix=prefix+"obligation:";
	
	//wwq: constant definitions for stream policies processing -- start
	
	public static final String STREAM_TAG = "stream";
	public static final String STREAM_NAME_TAG = "name";
	public static final String STREAM_ATTRIBUTE_TAG = "attribute";
	public static final String ATTRIBUTE_NAME_TAG = "name";
	public static final String ATTRIBUTE_TYPE_TAG = "type";
	
	public static final String RESOURCE_STREAM_ID=resourcePrefix+"stream-id";
	
	public static final String OBLIGATION_STREAM_FILTERING_ID = obligationPrefix + "stream-filter";
	public static final String OBLIGATION_STREAM_MAPPING_ID = obligationPrefix + "stream-map";
	public static final String OBLIGATION_STREAM_WINDOW_AGGREGATION_ID = obligationPrefix + "stream-window";

	public static final String OBLIGATION_STREAM_ATT_FILTERING = obligationPrefix + "stream-filter-condition-id";
	public static final String OBLIGATION_STREAM_ATT_MAPPING = obligationPrefix + "stream-map-attribute-id";

	public static final String OBLIGATION_STREAM_ATT_AGGEGATION_WINDOW_TYPE = obligationPrefix + "stream-window-type-id";
	public static final String OBLIGATION_STREAM_ATT_AGGEGATION_WINDOW_SIZE = obligationPrefix + "stream-window-size-id";
	public static final String OBLIGATION_STREAM_ATT_AGGEGATION_WINDOW_STEP = obligationPrefix + "stream-window-step-id";
	public static final String OBLIGATION_STREAM_ATT_AGGEGATION_WINDOW_ATTR = obligationPrefix + "stream-window-attr-id";

	public static final String NO_RESULT_WARNING = "WARNING: NO RESULT WILL BE RETURNED FOR THE USER QUERY!"; 
	public static final String PARTIAL_RESULT_WARNING = "WARNING: ONLY PARTIAL RESULT WILL BE RETURNED!";
	
	public static final String WINDOW_ERROR = "ERROR: USER WINDOW IS NOT PERMITTED ON TARGET STREM!";
	
	//----- end
	
	public static final String OBLIGATION_COLUMN_AGG_ID = obligationPrefix+"column-aggregation";	
	public static final String OBLIGATION_SELECTION_ID = obligationPrefix+"simple-selection";
	public static final String OBLIGATION_SLIDING_WINDOW_ID = obligationPrefix+"column-sliding-window";
	public static final String OBLIGATION_APPROXIMATION_ID = obligationPrefix+"column-approximation";
	
	public static final String OBLIGATION_ATT_AGG=obligationPrefix+"aggregation-id";
	public static final String OBLIGATION_ATT_SELECTION=obligationPrefix+"selection-id";
	
	public static final String OBLIGATION_ATT_WINDOW_START=obligationPrefix+"sliding-window-start-id";
	public static final String OBLIGATION_ATT_WINDOW_END=obligationPrefix+"sliding-window-end-id";
	public static final String OBLIGATION_ATT_WINDOW_SIZE=obligationPrefix+"sliding-window-size-id";
	public static final String OBLIGATION_ATT_WINDOW_STEP=obligationPrefix+"sliding-window-step-id";
	public static final String OBLIGATION_ATT_WINDOW_COLUMN=obligationPrefix+"sliding-window-column-id";
	
	public static final String OBLIGATION_ATT_APPROX_PARAM=obligationPrefix+"approximation-param-id";
	public static final String OBLIGATION_ATT_APPROX_VALUE=obligationPrefix+"approximation-value-id";
	
	public static final String actionPrefix=prefix+"action:";
	public static final String ACTION_ID=actionPrefix+"action-id";
	
	public static final String READ_ACTION = "read";
	public static final String WRITE_ACTION = "write";
	public static final String SHOW_TABLE_ACTION = "show_table";
	public static final String SHOW_COLUMN_ACTION = "show_column";
	
	public static final String MATCH_STRING="urn:oasis:names:tc:xacml:1.0:function:string-equal";
	
	public static final String TYPE_STRING="http://www.w3.org/2001/XMLSchema#string";
	public static final String TYPE_INTEGER="http://www.w3.org/2001/XMLSchema#integer";
	
	public static final String ATT_VALUE_AVERAGE="avg";
	public static final String ATT_VALUE_SUM="sum";
	public static final String ATT_VALUE_MIN="min";
	public static final String ATT_VALUE_MAX="max";
	
	public static final String OBLIGATION_SLIDING_WINDOW_START = obligationPrefix + "sliding-window-start";
	public static final String OBLIGATION_SLIDING_WINDOW_END = obligationPrefix + "sliding-window-end";
	public static final String OBLIGATION_SLIDING_WINDOW_SIZE = obligationPrefix + "sliding-window-size";
	public static final String OBLIGATION_SLIDING_WINDOW_STEP = obligationPrefix + "sliding-window-step";
	
	public static final String OBLIGATION_APPROXIMATION_VALUE = obligationPrefix+"approximation-value";
	
	public static final String OBLIGATION_APPROXIMATION_PARAM = obligationPrefix + "approximation-param";
}
